package com.ticket.service.impl;

import com.ticket.dao.StageDao;
import com.ticket.entity.HomePage;
import com.ticket.entity.StageCollect;
import com.ticket.service.StageService;
import com.ticket.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author 全谢民
 * @version 8.0
 * @description: TODO
 * @date 2023/10/9 19:27
 */
public class StageServiceImpl  implements StageService {
    static StageDao sd ;
    static {
        SqlSession sqlSession = MybatisUtil.getSqlSession();
        sd= sqlSession.getMapper(StageDao.class);

    }

    /*
     * @author 全谢民
     * @description TODO 前端首页舞台活动
     * @date 2023/10/13 8:37
     */
    @Override
    public List<HomePage> selHomeStageList(int stageClassifyId) {
        List<HomePage> homePageList = sd.selHomeStageList(stageClassifyId);
        return homePageList;
    }

    /*
     * @author 全谢民
     * @description TODO 查询用户收藏列表的舞台活动收藏
     * @date 2023/10/9 19:28
     */
    @Override
    public List<StageCollect> selStageCollectList(int userId) {
        List<StageCollect> stageList= sd.selStageCollectList(userId);
        return stageList;
    }


}
